package com.andnnl.fileanalysis;

import java.io.InputStream;
import java.util.List;

/**
 * Created by chenss on 2021/6/2.
 */
public interface FileAnalysis {

    void analysis(InputStream is, AnalysisListenerBase listener, AnalysisParam param);

    void handleRow(List<String> row,Integer rowNum, AnalysisListenerBase listener, AnalysisParam param);

    default void finish(AnalysisListenerBase listener, AnalysisParam param){
        listener.finish();
    }

//    default void handleHead(List<String> row, AnalysisListenerBase listener, AnalysisParam param) {
//        listener.invokeHead(row);
//    }

    default void handleHead(List<String> row,Integer rowNum, AnalysisListenerBase listener, AnalysisParam param) {
        listener.invokeHead(row,rowNum);
    }

}
